package com.gln.bloger.service;

import java.util.List;

import com.gln.bloger.exception.BlogerException;
import com.gln.bloger.pojos.Comment;
import com.gln.bloger.pojos.Website;
import com.gln.bloger.util.PagingSupport;

public interface CommentService {
	/**
	 * get comment
	 * @param entryId
	 * @return
	 * @throws BlogerException
	 */
	public List<Comment> getComments(String entryId) throws BlogerException;
	/**
	 * 
	 * @param comment
	 * @param entryId
	 * @throws BlogerException
	 */
	public void saveOrUpdateComment(Comment comment, String entryId) throws BlogerException;

	/**
	 * get all comments
	 * @param website
	 * @return
	 * @throws BlogerException
	 */
	public PagingSupport<Comment> getAllComments(Website website) throws BlogerException;
	/**
	 * get recent comments
	 * @param website
	 * @param size
	 * @return
	 * @throws BlogerException
	 */
	public List<Comment> getRecentComments(Website website)throws BlogerException;
	/**
	 * get wait for approve comments
	 * @param website
	 * @return
	 * @throws BlogerException
	 */
	public List<Comment> getWaitForApproveComments(Website website)throws BlogerException;
    /**
     * remove comment
     * @param id
     * @return
     * @throws BlogerException
     */
	public void remove(String id) throws BlogerException;
	/**
	 * approve comment
	 * @param id
	 * @throws BlogerException
	 */
	public void approve(String id) throws BlogerException;
	/**
	 * clear cached recent comments
	 */
	public void clearCachedRecentComments();
}
